package cn.edu.buaa.sei.jdat.search;

import java.util.ArrayList;
import java.util.List;
import cn.edu.buaa.sei.jdat.model.Element;

public class IndexItem {
	private List<Element> elements;
	
	public IndexItem() {
		elements = new ArrayList<Element>();
	}
	
	public int size() {
		return elements.size();
	}
	
	public void add(Element element) {
		elements.add(element);
	}
	
	public void remove(Element element) {
		elements.remove(element);
	}
	
	public String getName() {
		if (elements.size() == 0)
			return null;
		else
			return elements.get(0).getName().toLowerCase();
	}
	
	public String getFullName() {
		if (elements.size() == 0)
			return null;
		else
			return elements.get(0).getSimpleSignature().toLowerCase();
	}
	
}
